/*
 * Copyright (c) 2024 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef MYAPPLICATION_ADTEST_H
#define MYAPPLICATION_ADTEST_H

#include "test_base.h"

class AdTest : public TestBase {
public:
    AdTest() = default;
    ~AdTest() override = default;

protected:
    void OnTestPerformance() override;

    std::vector<float> fontSize_;   // 每行文字大小
    std::vector<float> lineHeight_; // 每行绘制的Y轴坐标
};

class AdTest1 : public AdTest {
public:
    AdTest1() {
        text_ = {
            "😆 欢迎邻居友友光临麦麦~",
            "⚡速戳➤http://mcd.cc/i_WNE",
            "👫长按扫码加入『麦麦福利群』",
            "—————— (•̤̀ᵕ•̤́) ——————",
            "✨群里超多宠粉惊喜等你解锁",
            "╭┈┈┈┈┈┈┈╮",
            "领完不下单，再领下面的红包",
            "┊多重福利周周拿┊{\\__/}",
            "┊新鲜资讯一站享┊( • • )",
            "┊趣味互动玩不停┊💝⊂ \\",
            "┊贴心服务在身边┊速来",
            "╰┈┈┈┈┈┈┈╯",
            "—————— (•̤̀ᵕ•̤́) ——————",
            "进入小程序可了解更多餐厅信息",
            "还可参与趣味任务赢取下单奖励" ,
            "—————— (•̤̀ᵕ•̤́) ——————",
            "☎：0591-87321693"
        };
        fontSize_ = {30, 40, 40, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30};
        lineHeight_ = {140, 180, 220, 260, 300, 340, 380, 420, 460, 500, 540, 580, 620, 660, 700, 740, 780};
    }
};

class AdTest2 : public AdTest {
public:
    AdTest2() {
        text_ = {
            "📣小羊@你该领红包点餐啦！",
            "【先领】翻倍通用红包",
            "👉：https://y-03.cn/1Hb7Mx",
            "领完不下单，再领下面的红包",
            "【再领】八元独家红包",
            "👉：mp://e1cxVdYYYodaBLB",
            "领完不下单，再领下面的红包",
            "【再领】店铺叠加红包",
            "👉：mp://BUYd3af6xijY2si",
            "与上方红包叠加使用",
            "___________________",
            "✅饿了么限量特价菜✅",
            "➥mp://QheGTPH3GjCEdHG",
            "⭐付款时一定要勾选两个红包",
            "⭐叠加两个红包付款超级优惠"
        };
        fontSize_ = {20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 40, 40};
        lineHeight_ = {150, 200, 250, 300, 350, 400, 450, 500, 550, 600, 650, 700, 750, 800, 850};
    }
};

class AdTest3 : public AdTest {
public:
    AdTest3() {
        text_ = {
            "中文的你好是你好，",
            "日文的你好是こんにちは，",
            "韩文的你好是안녕하세요，",
            "泰语的你好是สวัสดี，",
            "中文的吃饭是吃饭，",
            "日文的吃饭是食事，",
            "韩文的吃饭是식사，",
            "泰语的吃饭是รับประทานอาหารเย็น。"
        };
        fontSize_ = {40, 40, 40, 40, 40, 40, 40, 40};
        lineHeight_ = {200, 300, 400, 500, 600, 700, 800, 900};
    }
};

#endif //MYAPPLICATION_ADTEST_H
